ApiObject
Every event function receives the yeet API object as its first argument. Here you will find all the functions and constructors to interact with the yeet elements.
UI
In the UI group, you will find the following functions:
getObject()
getObject(id, type, sourceConfigType?, sourceConfigId?) => yeetRuntimeObject
Create a new RuntimeObject by specifying the unique ID and the component type. If a component is to be used outside of the active main container, you must also specify the ID and component type of the main container.
Name | Type | Description |
---|---|---|
id | number | Component ID general > meta > componentId |
type | string | Component type general > meta > componentType |
sourceConfigType (optional) | string | Main container type general > meta > componentType |
sourceConfigId (optional) | id | Main container ID general > meta > componentId |
As a return object, you will receive your yeetRuntimeObject.
actions
create()
create(rpcName, actionName) => yeetActionObject
If you want to execute a C16 function on the yeetCore, you can create an action object with the create() method. The action object will then be internally registered and can be queried by the action name. You can then execute the function, control the status, or query the result through the action object.
Name | Type | Description |
---|---|---|
rpcName | string | C16 action name |
actionName (optional) | string | If no actionName is provided, the action is registered under the rpcName. |
As a return object, you will receive your yeetActionObject.
delete()
delete(actionName) => void
If you want to delete an yeetActionObject, you can unregister the yeetActionObject using the action name.
Name | Type | Description |
---|---|---|
actionName | string | Registered action name |
There is no return object.
get()
get(actionName) => yeetActionObject
Once you have registered an yeetActionObject, you can retrieve it at any time using the action name.
Name | Type | Description |
---|---|---|
actionName | string | Registered action name |
As a return object, you will receive your yeetActionObject.
Clipboards
ClipboardEntityDelete()
ClipboardEntityDelete(ClipboardId) => void
If you want to delete an entity entry, the ClipboardEntityDelete
function sends a command to the Clipboard with the provided ClipboardId. The Clipboard then deletes the record with the RecordID that has been entered under the Keys group with _id.
To execute this command, the Clipboard must have "use Entity" activated, and all necessary entity properties must be specified.
Name | Type | Description |
---|---|---|
ClipboardId | number | Unique Clipboard ID. |
There is no return object.
ClipboardEntityUpdate()
ClipboardEntityUpdate(ClipboardId) => void
If an entity entry needs to be modified, the ClipboardEntityUpdate
function sends a command to the Clipboard with the given ClipboardId. The Clipboard updates the record with the RecordID specified under the Keys group with _id. To do this, the values of the Clipboard properties are transferred. These should have the same names as the entity properties.
To allow a Clipboard to capture all entity properties, the properties can be generated from the entity using AutoProperties. To do this, the AutoProperties function must be activated for the entity properties under Clipboards.
For the Clipboard to execute this command, "use Entity" must be enabled in the Clipboard, and all necessary entity properties must be specified.
Name | Type | Description |
---|---|---|
ClipboardId | number | Unique Clipboard ID. |
There is no return object.
ClipboardEntityRead()
ClipboardEntityRead(ClipboardId) => void
If you want to read an entity entry, the ClipboardEntityRead function sends a command to the Clipboard with the provided ClipboardId. The Clipboard then loads the record with the RecordID specified under the Keys group at _id. The loaded data is then stored in the corresponding Clipboard properties with the same name. Once all the data is loaded into the Clipboard properties, an update is sent to all recipient components listening to the Clipboard via SourceLink.
For the Clipboard to execute this command, "use Entity" must be enabled in the Clipboard, and all necessary entity properties must be specified.
Name | Type | Description |
---|---|---|
ClipboardId | number | Unique Clipboard ID. |
There is no return object.
ClipboardUpdate()
ClipboardUpdate(ClipboardId, value) => void
If multiple Clipboard properties need to be updated, a JavaScript payload is passed in which the Clipboard property names are used as property names, and underneath, the new values are entered.
{
property1: "text",
property2: 2
}
Once all the data is loaded into the Clipboard properties, an update is sent to all recipient components listening to the Clipboard via SourceLinks.
Name | Type | Description |
---|---|---|
ClipboardId | number | Unique Clipboard ID. |
value | FrontEndyeetODataTypes | Javascript-Object that describes every updated Clipboardproperty |
There is no return object.
ClipboardRead()
ClipboardRead(ClipboardId) => Promise<FrontEndyeetODataTypes>
To retrieve all Clipboard properties, you specify the ClipboardId and receive a FrontEndyeetODataTypes object via a Promise. This object contains an entry for each Clipboard property.
Name | Type | Description |
---|---|---|
ClipboardId | number | Unique Clipboard ID. |
As a return object, you receive a FrontEndyeetODataTypes object.
setEntityKeys()
setEntityKeys(ClipboardId, keyName, keyValue) => void
To enable the Clipboard to load a different entity entry, the entity key must be set. With the yeet database, you only need to set the entity property _id. If other OData sources become available in the future, you can also set multiple entity keys using the functions.
Name | Type | Description |
---|---|---|
ClipboardId | number | Unique Clipboard ID. |
keyName | string | Name of the entity key property |
keyValue | number | New value of the entity key property |
There is no return object.
getEntityKeys()
getEntityKeys(ClipboardId) => Promise<FrontEndyeetODataTypes>
If you want to know which entity entry your Clipboard is currently pointing to, you can retrieve the unique identifier of the entry with getEntityKeys
.
Name | Type | Description |
---|---|---|
ClipboardId | number | Unique Clipboard ID. |
As a return object, you receive a promise that returns a FrontEndyeetODataTypes object.
propertyUpdate()
propertyUpdate(ClipboardId, propertyName, value) => void
With propertyUpdate
, you can use JavaScript to set a new value in a Clipboard property.
Name | Type | Description |
---|---|---|
ClipboardId | number | Unique Clipboard ID. |
propertyName | string | Clipboard-Property-Name |
value | string, number | Neuer Propertywert |
There is no return object.
propertyRead()
propertyRead(ClipboardId, propertyName) => void
With propertyRead
, you can read a value from a Clipboard property.
Name | Type | Description |
---|---|---|
ClipboardId | number | Unique Clipboard ID. |
propertyName | string | Clipboard property name |
As a return object, you receive a promise that returns a string or number.
odata
odataEntityCreate()
odataEntityCreate(entityName, entityValue, baseUrl?) => Promise<yODataResponse<unknown>>
You can use odataEntityCreate
to create a new entity entry using JavaScript.
Name | Type | Description |
---|---|---|
entityName | string | Name of the entity in the database |
entityValue | FrontEndyeetODataTypes | Object containing data for the entity properties |
baseUrl (optional) | string | URL to another yeet database (not yet supported) |
As a return object, you will receive a Promise which returns the newly created entity entry. Since the id is automatically assigned, you can directly retrieve the RecordID of your new entry.
odataEntityDelete()
odataEntityDelete(entityName: string, entityKeyPropertyValues: FrontEndyeetODataTypes, baseUrl?: string | undefined) => Promise<yODataResponse<unknown>>
To delete an entity entry, you need to provide an object that contains all the entity keys and their corresponding values. In the yeet database, there is always only one entity key (_id), which is the record related id.
Name | Type | Description |
---|---|---|
entityName | string | Name of the entity in the database |
entityKeyPropertyValues | FrontEndyeetODataTypes | Object containing all the entity key values of the entry to be deleted |
baseUrl (optional) | string | URL to another yeet database (not yet supported) |
As a return object, you receive a promise that returns an empty string upon completion.
odataEntityRead()
odataEntityRead(entityName, query, entityKeyValues, baseUrl?) => Promise<yODataResponse<unknown>>
To read an entity entry, you can pass a yODataQuery object to retrieve a list of entity entries, or you can select a specific entry using entityKeyValues. In the yeet database, there is always only one entity key(_id), which is the record related id.
Name | Type | Description |
---|---|---|
entityName | string | Name of the entity in the database |
query | yODataQuery | undefined | Object with various options to load a list of entities |
entityKeyValues | FrontEndyeetODataTypes | Object containing all entity key values of the entity entry to be read |
baseUrl (optional) | string | URL to another yeet database (not yet supported) |
As a return object, you will receive a promise that is filled with an array containing all queried entity entries.
odataEntityUpdate()
odataEntityUpdate(entityName, entityValue, entityKeyPropertyValues, baseUrl?) => Promise<>
To update an entity entry, you can provide a object to specify the entries to be updated. You also need to provide the entityKeyPropertyValues object to determine which entity entry should be modified. In the yeet database, there is always only one entity key (_id), which is the record related id.
Name | Type | Description |
---|---|---|
entityName | string | Name of the entity in the database |
entityValue | FrontEndyeetODataTypes | Object containing new values for the entity properties |
entityKeyPropertyValues | FrontEndyeetODataTypes | Object containing all the entity key values of the entity entry to be modified |
baseUrl (optional) | string | URL to another yeet database (not yet supported) |
The return object is a promise without a return value.
odataMetaData()
odataMetaData(baseUrl?) => Promise<yODataMetadata>
The metadata of the database can be retrieved using odataMetaData
.
Name | Type | Description |
---|---|---|
baseUrl (optional) | string | URL to another yeet database (not yet supported) |
As a return object, you will receive a Promise that returns a MetadataObject. Here, you can find all entities, enums, and actions.
popup
popupClose()
popupClose(popupId) => void
You can use popupClose
to close a popup by specifying its popup ID.
Name | Type | Description |
---|---|---|
popupId | number | ComponentID of the yPopup generic > meta > componentId |
There is no return object.
popupOpen()
popupOpen(popupId, componentType, componentId, parentType, parentId) => void
You can use popupOpen
to open a popup by specifying its popup ID. Additionally, you indicate which component should be used as the positioning reference. To do this, provide the id and type of the component, and specify the id and type of the MainContainer where the component is stored.
Name | Type | Description |
---|---|---|
popupId | number | Component ID of the yPopup generic > meta > componentId |
componentType | string | Component type from which it was opened. |
componentId | number | Component id from which it was opened. |
parentType | string | MainContainer type from which it was opened. |
parentid | number | MainContainer id from which it was opened. |
There is no return object.
user
Metadata for the logged-in user.
Name | Type | Description |
---|---|---|
name | string | Username of the logged-in user. |
role | string | Role of the user. |
token | string | (Currently not supported) |
refreshToken | string | (Currently not supported) |
types
Constructors for creating complex property values.
colorValue
To create a ColorValue, you can use the following hexadecimal values.
- transparent
- #FFF
- #FFFFFF
- #FF00FFFF
All input values are stored in the hex8 property as #RRGGBBAA (hex8 color).
class ColorValue {
hex8 : string
constructor(hexString)
}
columnValue
To create a custom table column
class columnValue {
field: StringProperty;
type: StringProperty;
nullable: BooleanProperty;
displayEditDialog: StringProperty;
displayTable: StringProperty;
sort: StringProperty;
filter: BooleanProperty;
label: StringProperty;
name: StringProperty;
visible: BooleanProperty;
sticky: BooleanProperty;
orderId: NumberProperty;
userCreated: BooleanProperty;
bodyCell__minWidth: UnitNumberProperty | undefined;
bodyCell__maxWidth: UnitNumberProperty | undefined;
bodyCell__fontAlignHorizontal: StringProperty | undefined;
bodyCell__fontAlignVertical: StringProperty | undefined;
bodyCell__bgColor: ColorProperty | undefined;
bodyCell__fontSize: UnitNumberProperty | undefined;
bodyCell__fontWeight: NumberProperty | undefined;
bodyCell__fontColor: ColorProperty | undefined;
columnHeader__fontAlignHorizontal: StringProperty | undefined;
columnHeader__fontAlignVertical: StringProperty | undefined;
columnHeader__bgColor: ColorProperty | undefined;
columnHeader__fontSize: UnitNumberProperty | undefined;
columnHeader__fontWeight: NumberProperty | undefined;
columnHeader__fontColor: ColorProperty | undefined;
constructor(
field = "NoField"
type = "string",
nullable = false,
displayEditDialog = "y-input",
displayTable = "text",
sort = "none",
filter = true,
label = "NoLabel",
visible = true,
orderId = -1,
userCreated = false
bodyCell__minWidth: UnitNumberValue | undefined = undefined,
bodyCell__maxWidth: UnitNumberValue | undefined = undefined,
bodyCell__fontAlignHorizontal: String | undefined = undefined,
bodyCell__fontAlignVertical: String | undefined = undefined,
columnHeader__fontAlignHorizontal: String | undefined = undefined,
columnHeader__fontAlignVertical: String | undefined = undefined,
columnHeader__bgColor: ColorValue | undefined = undefined,
bodyCell__bgColor: ColorValue | undefined = undefined,
sticky = false,
columnHeader__fontSize: UnitNumberValue | undefined = undefined,
columnHeader__fontWeight: NumberValue | undefined = undefined,
bodyCell__fontSize: UnitNumberValue | undefined = undefined,
bodyCell__fontWeight: Number | undefined = undefined,
columnHeader__fontColor: ColorValue | undefined = undefined,
bodyCell__fontColor: ColorValue | undefined = undefined
);
}
Name | Type | Description |
---|---|---|
field | String | Entity property name |
type | String | Entity property type |
nullable | Boolean | Is Null an valid value |
displayEditDialog | String | Control how the value gets displayed for edit |
displayTable | String | Controls how the values get visualized in table |
sort | String | Column sort |
filter | Boolean | Show filter options |
label | String | Column label |
name | String | Uniqe column name |
visible | Boolean | Hide column |
sticky | Boolean | Sticky Column(always visible) |
orderId | Number | Order position |
userCreated | Boolean | Column is createdy by user |
bodyCell__minWidth | UnitNumberValue | undefined | Override column min width |
bodyCell__maxWidth | UnitNumberValue | undefined | Override column max width |
bodyCell__fontAlignHorizontal | String | undefined | Override hoizontal content alignment |
bodyCell__fontAlignVertical | String | undefined | Override vertical content alignment |
bodyCell__bgColor | ColorValue | undefined | Override column background color |
bodyCell__fontSize | UnitNumberValue | undefined | Override column font size |
bodyCell__fontWeight | NumberValue | undefined | Override column font weight |
bodyCell__fontColor | ColorValue | undefined | Override column font color |
columnHeader__fontAlignHorizontal | String | undefined | Override columnheader hoizontal content alignment |
columnHeader__fontAlignVertical | String | undefined | Override columnheader vertical content alignment |
columnHeader__bgColor | ColorValue | undefined | Override columnheader background color |
columnHeader__fontSize | UnitNumberValue | undefined | Override columnheader font size |
columnHeader__fontWeight | Number | undefined | Override columnheader font weight |
columnHeader__fontColor | ColorValue | undefined | Override columnheader font color |
OptionListValue
Object to specify an option of a selection.
class OptionListValue {
value: string;
label: string;
icon?: string;
tooltip?: string;
constructor();
constructor(initValue: string);
constructor(initValue: string, initLabel: string);
constructor(initValue: string, initLabel: string, initIcon: string);
constructor(initValue: string, initLabel: string, initIcon?: string, initToolTip?: string);
constructor(initValue?: string, initLabel?: string, initIcon?: string, initToolTip?: string);
}
Name | Type | Description |
---|---|---|
value | String | Option value |
label | String | Display value |
icon (optional) | String | Icon name |
tooltip (optional) | String | Tooltip text |
UnitNumberValue
Creating a unit value consisting of a numerical value and a unit. Unit and value can be specified separately or as a string.
export class UnitNumberValue {
value: number;
unit: string;
constructor();
constructor(value: string);
constructor(value: number);
constructor(value: number, unit: string);
constructor(value: number | string = 0, unit = "px");
cssValue() => string;
}
Name | Type | Description |
---|---|---|
value | Number | Number value |
unit | String | Unittype |
cssValue() | Function | Return a string used for css classes |
Objecttypes
yODataQuery
Optional query properties
let queryOptions = {
$filter?: string;
$select?: string[];
$skip?: number;
$top?: number;
}
Name | Type | Description |
---|---|---|
$filter (optional) | String | Odata filter string |
$select (optional) | String[] | Which entity properties should be loaded |
$skip (optional) | Number | How many entries to skip |
$top (optional) | Number | How many entity records to load |
PropertyValueTypes
type PropertyValueTypes =
| string
| number
| boolean
| UnitNumberValue
| ColorValue
| ValidatorListValue[]
| OptionListValue[]
| ColumnValue[];
FrontEndyeetODataTypes
interface FrontEndyeetODataTypes {
[key: string]: FrontEndyeetODataType;
}
FrontEndyeetODataType
type Front FrontEndyeetODataType =
string | number | boolean | null
yeetRuntimeObject
This object represent a component config
class yeetRuntimeObject {
get(category, group, property) => Propertytypes;
set(category, group, property) => void;
property(category, group, property) => yeetRuntimeProperty;
reset(category, group, property) => void;
}
get()
get(category, group, property) => Propertytype;
Name | Type | Description |
---|---|---|
category | string | Propertycategory |
group | string | Propertygroup |
property | string | Propertyname |
As a return object, you will receive the property value.
set()
set(category, group, property, value) => void;
Name | Type | Description |
---|---|---|
category | string | Propertycategory |
group | string | Propertygroup |
property | string | Propertyname |
value | PropertyValuetypes | New property value |
There is no return object.
property()
Creates a yeetRuntimeProperty. With this, you can directly set the property without having to specify the property path.
property(category, group, property) => yeetRuntimeProperty;
Name | Type | Description |
---|---|---|
category | string | Property category |
group | string | Property group |
property | string | Property name |
As a return object, you will receive the yeetRuntimeProperty.
reset()
Indicates that the property should be set again by the theme.
Not all properties can be set by a theme.
reset(category, group, property) => void;
Name | Type | Description |
---|---|---|
category | string | Property category |
group | string | Property group |
property | string | Property name |
There is no return object.
yeetRuntimeProperty
This object represent a component property
class yeetRuntimeObjectProperty {
get()=>PropertyValueTypes;
set(value: PropertyValueTypes)=>void;
reset()=>void;
}
get()
Gets the value of the property.
get() => PropertyValueTypes;
As a return object, you receive a PropertyValueType object.
set()
Sets the value of the property.
set(value) => PropertyValueTypes;
Name | Type | Description |
---|---|---|
value | PropertyValueTypes | neues Value für die Property |
There is no return object.
reset()
Indicates that the property should be set again by the theme.
Not all properties can be set by a theme.
reset() => void;
There is no return object.